package polymorphism;

public class PolymorphismTest {
    public static void main(String[] args) {
        Student student = new Student();
        Person person = (Person) student;
        person.sayHello();  //调用Student类的方法

        Person person2 = new Student();
        person2.sayHello(); //调用Student类的方法

    }
}
